With four states there are 2^4 =16 transitions are possible .
For each transitions, there are 4 possibilities 1) no transition 2) transition on input a 3)transition on input b 4) transition with a or b both (assuming no epsilon move)
As there are total 16 possible transition Therefore total 4^16 diagrams will be possible .For each diagram we can have ( 1 , 2, 3 or 4 final states)I.e for each diagram we have (4c1+4c2+4c3+4c4) choices for final states .
Out of which we can remove following cases
1)all four states are disconnected
2)only 2 states are connected
3)only 3 connected states