n,a=list(map(int,input().split()))

l=list(map(int,input().split()))

dp=[0]*5300

dp[l[0]-a]=1



for x in l[1:]:

  b=x-a

  if b>=0:

    for i in range(2500,-2501,-1):

      dp[i+b]+=dp[i]

  else:

    for i in range(-2500,2501):

      dp[i+b]+=dp[i]

  dp[b]+=1

print((dp[0]))
n,a=list(map(int,input().split()))

from collections import defaultdict

dp=defaultdict(int)

dp[0]=1

for i in map(int,input().split()):

    i-=a



    for k in sorted(list(dp.keys()),reverse=(i>=0)):

        dp[k+i]+=dp[k]

print((dp[0]-1))
n, a = list(map(int, input().split()))
l = list(map(int, input().split()))
dp = [0] * 5300
dp[l[0] - a] = 1
for x in l[1:]:
    b = x - a
    if b >= 0:
        for i in range(2500, -2501, -1):
            dp[i + b] += dp[i]
    else:
        for i in range(-2500, 2501):
            dp[i + b] += dp[i]
    dp[b] += 1
print((dp[0]))

n, a = list(map(int, input().split()))
from collections import defaultdict

dp = defaultdict(int)
dp[0] = 1
for i in map(int, input().split()):
    i -= a
    for k in sorted(list(dp.keys()), reverse=(i >= 0)):
        dp[k + i] += dp[k]
print((dp[0] - 1))

-l = list(map(int, input().split())) -dp = [0] * 5300 -dp[l[0] - a] = 1 -for x in l[1:]: -    b = x - a -    if b >= 0: -        for i in range(2500, -2501, -1): -            dp[i + b] += dp[i] -    else: -        for i in range(-2500, 2501): -            dp[i + b] += dp[i] -    dp[b] += 1 -print((dp[0])) +from collections import defaultdict + +dp = defaultdict(int) +dp[0] = 1 +for i in map(int, input().split()): +    i -= a +    for k in sorted(list(dp.keys()), reverse=(i >= 0)): +        dp[k + i] += dp[k] +print((dp[0] - 1))