I personally generally define "clean" as clean from one's drug of addiction, although it does depend on the context the word is used in. If someone was addicted to heroin and they quit but are taking methadone or Suboxone strictly as maintenance and don't feel any high at all from it, merely the relief of withdrawal symptoms, then I think they have every right to say they are "clean" from heroin. They are still physically dependent on a drug but that shouldn't diminish the fact that they have still made major changes in their life and their use of drugs, and have clearly done some work on their mental addiction. I also think, for example, if someone was addicted to crack but they still smoke a joint or have a drink once a month that they are still "clean" from crack. However I wouldn't say something like "I'm totally clean from opioids" if I was still taking opioids, even if I was just maintaining or taking one that wasn't my drug of choice.
I know many people like to count number of days clean and define it to mean 100% abstaining from all drugs other than caffeine and nicotine, regardless of what drugs they had a problem with, but I don't define it that way myself and it bugs me when people push their own definitions on others, like giving someone a hard time for saying "I've been clean for 100 days" because they occasionally drink socially when that was never something they've had a problem with, or because they are on a maintenance drug or are prescribed a drug therapeutically.
Personally I don't count my number of days clean as I wouldn't even know how to count that, and it isn't very important to me or something I need to obsess over. But it is useful for me to sometimes look back on approximately how long I've gone without each specific drug that I felt was important to quit, to see that I've made progress or to consider improvements in things like PAWS during that time.
"Sober" I would generally define as not perceptibly intoxicated by drugs or alcohol. I wouldn't consider using drugs strictly therapeutically as being not "sober", even if it's a psychoactive drug, for example someone taking, say, an antidepressant, or an anxiolytic or sleeping pill, unless they are being used for recreational purposes etc. I also wouldn't consider drugs like caffeine or nicotine to make someone not "sober", since they have very subtle effects and don't make someone "intoxicated" or "high". I realize this definition is pretty vague, but it's more about how and why the drug is used and the way it affects the person.