added script that replaces notebook for counting components