```python
def count_X(tup, x):
  """
  Counts the occurrences of an element in a tuple.

  Args:
    tup: The input tuple.
    x: The element to count.

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