Thread:Extension talk:Arrays/Counting the number of occurences of a value in an array?/reply

Assuming your wiki has Extension:StringFunctions enabled, you could use wikia::yugioh:Template:Count. I don't think there's a built-in solution, though.