Count the number of numbers up to m which are divisible by given prime numbers
static int count ( int a [ ] , int n , int m ) { int [ ] parity = new int [ 3 ] ; for ( int i = 0 ; i < 3 ; i ++ ) parity [ i ] = 0 ;