Thank you for being the rare question where you actually provide what language you want your answer in; I approve, and encourage this.
In Java, the following will work. I made it a bit more versatile to work with others numbers, other than 99, if you so please (if not, just hardcode the 99 in yourself).
// Example list - fill this with numbers yourself. ArrayList<Integer> nums = new ArrayList<>(); int n = 99; int count = (int)nums.stream().filter(i -> i == n).count(); System.out.println(n + " occurences.");
Numerous amount of games have narrative, there is an entire genres built around narratives. Any RPG game has a narrative and even bog standard FPS games have some sort of backstory and effects setting a mood.