I think you can do this quite nicely as follows:
startvecs = datevec(startdates);
endvecs = datevec(enddates);
diffvecs = endvecs - startvecs;
countmonths = 12*diffvecs(:,1) + diffvecs(:,2)+1
Does that work for you? I'm not quite sure what you'd want to do between, say, Jan1 and Feb1, but I think if you take a look at diffvecs you'll understand what it contains and be able to make it work for your purposes.