I use Collectorz.com Movie Collector for cataloguing my movies. It has all the options you're looking for - sort by tags, genre, year of release, cast, director, title...
I use movie collector for exactly this scenario. It's not free, but very inexpensive and works great.
Once you have A/B assigned Excel can sort on that and give a count of how many of each. The formatting got a little messed up but below's a quick example. If you don't have Excel OpenOffice, a free MS Office clone, probably will do it also.
There's a commercial program, actually several but I'm familiar with this one, called Movie Collector that does what you want and much more. Put in a name of a movie or TV show and it goes out and gets all the data about it. Might be overkill for what you want but I thought I'd point it out.
Excel Example:
Category Title
Movie Matrix
Movie Star Wars
Movie Superman
Movie Count 3
TV Heros
TV Lost
TV Star Trek
TV Tek Wars
TV Count 4
Grand Count 7
I used mine quite a bit. I had a huge DVD collection and used it to enter them all in some dvd catalog software.
I then put that catalog on my palm pilot, so I that when I was out buying DVD's, I could be sure that I wasn't buying a duplicate.
A pretty huge waste of time, but the software synced with imdb, so it was also nice for quickly searching to see how many Van Damme movies I owned (lots). Or to see what imdb thought were my best\worst movies.
I use Collectorz.com movie collector along with CLZ barry barcode scanning app: http://www.collectorz.com/movie/
It's the best thing I've found for me, I know a few others use here use it also.
Edit: not sure about the ability to add digital versions, I've never tried.
The same company that does the Comic Collector has a program for movies called Movie Collector. They have a free online site which syncs to the program you can have others view your list.
Please note:
That they have a paid app for a barcode scanner called:
CLZ Barry, which I use via my phone to scan my comics and cds. Paid once.
They also have a paid app for use either on your phone or tablet for each category, music, comics, movies, etc.:
So if you want to view your collection on your phone, you would need the CLZ Movies app. I use the comic equivalent especially when I'm looking for back issues, don't want to get the same comic twice. I paid twice for the app, one for my iPad and the other for my Android phone.
Collectorz is basically the end-all, be all for a true collector. Their mobile app needs a few more features that it currently doesn't have, and their desktop app needs a means of applying a "current market value" (for insurance purposes), but overall it's pretty solid. If you're willing to spend money on movies, you should be willing to spend money on your software you use to catalog them. It's worth every penny, and they update it very frequently. iTrackmine has the current market value, pulled from Amazon, but it's the only one I can think of that has that feature (and it's shit in every other way).