Your scores are recorded for every game you play on Lumosity. Every game has the potential to affect your LPI (except for Early Access games and Language games.) Scores are recorded regardless of how you access them (either through training sessions, the Games page, or by replaying a game.)
The Math LPI isn’t included in the Cognitive LPI since the Math category contains knowledge-based games instead of cognitive-based games. Math games only count towards the Math LPI.