Shakespeare was a master of playwrighting, not novel-writing. Thus, he didn't pen any novels. His works are primarily famous plays like Romeo and Juliet and Hamlet.
William Shakespeare didn't write novels at all. His literary legacy lies in his remarkable collection of plays that have stood the test of time and are still widely performed and studied today.
William Shakespeare is known mainly for his plays rather than novels. So, the number of novels written by him is zero.