Count Projects in a Scratch Studio
I would highlight the following areas of possible improvements:


argument parsing: even though you have only 2 arguments to handle, using argparse would simplify the code and improve readability. It would also might make sense to have "url or studio ID" defined in a custom type, raising ArgumentTypeError if validation fails
HTML parsing: in general, parsing HTML with regexes or using str.count(), str.find() is considered a bad practice. Consider switching to an HTML parser like lxml or BeautifulSoup instead
HTTP requests: instead of using requests.get() every single time, initialize session = requests.Session() and re-use it using session.get(). This would make a positive and noticable impact on performance. 


  if you're making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase 


And, see if you can improve on detecting 404 - would issuing .head() requests instead of .get() and checking .status_code work instead of downloading the whole page and checking for &lt;!D in the HTML code.