```python
def frequency(a, x):
  """
  Finds the frequency of a number in a given array.

  Args:
    a: A list of numbers (the array).
    x: The number to find the frequency of.

  Returns:
    The number of times x appears in a.
  """
  return a.count(x)
```