What sensors can accurately detect size of content in a closed container such as number of pills in a pill box?
Maybe adheretech uses a simple IR sensor which counts the number of pills coming out of the box. It won't be that difficult actually. You could make the hole from which the pills come out such that only one comes out at a time and then put an IR sensor which gives you a +1 count whenever there's an interference in it's sensing range. This way you could count the number of pills coming out of the box.