How to find Number of Homomorphism