Publishing software in a convenient way I create a software in order to solve a step of an specific problem. The results obtained (aided by the software) are going to be published in some journal. The focus of the publication is far away from that step.

The software may be very useful for other people because that step is involved in many common problems. It is not a huge code, but neither me or my collaborators known about other similar software for the matter. We know many researchers that solve it manually in long time.

I want to make the software available online. I wish to do it in some way that it can be cited (and the cites counted).

I can include the code in the supporting information, but I think that it has some downsides:


Hard to find compared to a site like github.
Impossible to polish and improve it. 


If I don't attach it to a paper, then I don't know how it can be cited.

In short I want to: Make the code widely avaliable in some way that let me collect cites, and make me free to modify/improove the code after publication.

Is there any way? Which are my best options?
What do you mean by "and the cites counted"? Do you mean something like Google Scholar will index it?

If so, then the common route in CS is to publish something that introduces the program (although the code often lives on github). Then people will often cite that paper and or the repo whenever they use your program.

That isn't necessarily a ton of work either. Many conferences have workshops  or industry tracks (in case you are an engineer and not a researcher). Also, see dgraziotin's answer on publishing a paper in an open access journal so that others could cite his work.