Driver code
public static void main ( String args [ ] ) { int arr [ ] = { 30 , 1 , 42 , 5 , 56 , 3 , 56 , 9 } ; int n = arr . length ; int x = 56 ; System . out . print ( count ( arr , 0 , n - 1 , x ) ) ; } }