Sadly, we aren't sure. I can give you the standard number, which is 37, but our records are sketchy. There's some indication of lost plays, and of a collaboration; that would bring the number to 40.
The most common answer is 37.
He is given credit for 37 plays--there may be more that are not credited to him since there is the criticism about authorship. Check out the links below and the information here at eNotes in the Shakespeare group to find out more.
All Is True (Henry VIII), All's Well that Ends Well, Antony and Cleopatra, As You Like It, The Comedy of Errors, Hamlet, Henry IV Part 1, Henry IV Part 2, Henry V, Henry VI Parts 1, 2, 3, Julius Caesar, King Lear, Love's Labours Lost, Macbeth, Measure for Measure, The Merchant of Venice, The Merry Wives of Windsor, A Midsummer Night's Dream, Much Ado About Nothing, Othello, Richard II, Richard III, Romeo and Juliet, The Taming of the Shrew, The Tempest, Titus Andronichus, Triolus and Cressida, Twelfth Night, The Two Gentleman of Verona, The Winter's Tale, Henry VIII, King John, Love's Labors Won, Cymbeline, Timon of Athens