Given a starting key (the lowest note of the chord) there are only 4 types of chord with the following intervals between the notes of the chord: 2-2, 2-3, 3-2, 3-3. For the sake of illustration, let the bottom note of the chord be C. There are two ways of interpretating the meaning of gap. If a gap of 2 means two clear keys between two notes, then the minimum musical interval is a minor 3rd and a gap of 3 implies a major 3rd. The other interpretation is the distance between two adjacent notes of the chord, so 2 would mean a major 2nd and 3 a minor 3rd. So the chords with C as the lowest note would, under the first interpretation, be CE-F+ (C dim) where minus means flat and plus means sharp. The next chord is CE-G (C min), the next CEG (C maj), the last CEG+ (C aug). But there are 12 chromatic keys, so there will be 48 chords in one octave. The next group would be C# dim, C# min, C# maj, C# aug. The last key would be B dim, B min, B maj, B aug.
Under the second interpretation the chords would be CDE, CDF, CE-F, CE-F+.
The chords can be played in any octave and 61 keys make 5 octaves on a keyboard. So if we include the position of the chord as well as the type we need to multiply by 5 to give us 5×48=240 chords. But we are restricted by the highest note on the keyboard. Let’s suppose the keyboard starts on a C then it will also end on C. We need to subtract a few chords. In the highest octave we’re OK till we get to F as the lowest note. So from C to E we have 20 chords. Then with F we have only F dim, F min, F maj; for F# we have only F# dim, so we have only 24 chords instead of 48, a loss of 24 chords. That makes the total 240-24=216. That’s under the first interpretation.
Under the second interpretation, we lose 16 chords in the highest octave because the last chords are GAB, GAC, GB-C, A-B-C. So there are 7×4+4=32 in the last octave. The total is 224.