9. Write a function template that will act like the generic algorithm count_if, which
returns how many times an item satisfying the predicate occurs in a half-open range.
For example, given the definition:
int arr[] = { 2, 5, 2, 4, 5, 7, 2 };
The following code
count(arr, arr+8, isEven) // isEven returns true if and only if the argument is even
would return the value 4 because there are four even numbers in the range. Because you are
writing a function template, your code will also work for an STL list of integers or vector of
integers...