import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): mod=10**9+7 N,K=MI() A=LI() A.sort(reverse=True) for i in range(N): A[i]-=K M=11000 dp=[[0]*(M+1) for _ in range(N+1)] # i番目まで見てプラスj点を何通り作れるか dp[0][0]=1 for i in range(N): a=A[i] for j in range(M-200): dp[i+1][j]+=dp[i][j] dp[i+1][j] %=mod if a+j>=0: dp[i+1][j+a]+=dp[i][j] dp[i+1][j+a]%=mod ans=0 for j in range(M): ans+=dp[-1][j] ans%=mod print(ans-1) main()