Does it matter how many users use a certain feature for it to be implemented?
Off course it is, but as Stephen has said, this is much more of a product management business than UX (particularly as you talk about implementation), but UXers may be the ones deciding priorities as well.
We do quite some coding in UX. Perhaps the most obvious place is evaluation, where issues has to be ranked based on severity, frequency and effect on users.
Also, when designing something, research into frequency is important - a feature that is hardly used won't get as much spotlight on the interface as a feature that is used.
A UX deliverable (research or SWaPs) may just well include what's most urging.
Is it good practice to implement features even if a small fraction of the userbase actually uses it?
I think there's a slip in how this question is phrased: How can users 'actually use' something that wasn't implemented yet? I guess you meant something like "want to use".
Then, from a UX perspective, if there's a need, there should be an implementation. So if the design of the system is UX-driven (unlike feature-driven), the need will be identified during the research/requirements phase, and should be included in the designs, which will then be implemented.
Not sure this is relevant, but from a product management perspective some features are 'easy-wins': they are quick to implement (say 2 hours of a developer time). Even if the feature only benefit, say, 3% of the users, you may just as well go with it.
But then there's the functionality-usability trade-off, where more functionality means less usability. So depending on many many variables, the decision might be not to go ahead with the feature.