What are the numbers appearing on midi tracks? It happens only when I am importing external midi files.
It's the MIDI "program change" number which is usually used to indicate what instrument should play on that channel (and track in this case).
General MIDI dictates a specific list of what instruments correspond to what numbers. That way different implementors can all make their own sounds and stay compatible with existing MIDI files, etc. So one company can make a new sound card or keyboard or whatever that includes more realistic sounds but it still plays the intended instrument type.
In the case of importing MIDI to Logic, it separates the channels to tracks and then uses that program change number to decide which sound to use from Logic's library of sounds. In your case, 28 and 29 should indicate "clean electric guitar" and "muted electric guitar".