I want to say something like
my interests/interest in basketball and table tennis gradually develops as ....
shall I use interests or interest, and what is the general rule behind this?
The word interest is both a countable and uncountable noun. It's also used as a verb.
You use interest as an uncountable noun when you talk of a state or feeling of wanting to know about or take part in something. For example, he has (an) interest in politics. I have no interest in science subjects. My interest in basketball and table tennis increases gradually.
You use interest as a countable when you refer to it as an activity that you enjoy doing or spend time to learn about. It also refers to something that brings advantage to you. For example, basketball and table tennis are his interests. He looks after his own interests.
If you look up the word in a dictionary, you will find many other uses.
Technically it should be plural here since you are talking about two interests. You may want to consider changing the phrasing of the sentence, however, since "my interests in..." sounds a bit awkward to me.
If you said "my interest in basketball and table tennis" then it would imply that there is some connection between the two.
As a better example, someone might say "my interest in track and field," referring to "track and field" as one thing even though it technically is two nouns.