I am a foreign student in the U.S., getting a degree in psychology while living with my aunt and uncle. They own a restaurant, which isn’t doing very well, so I help out there when I can. If the restaurant closes, they might have to move. I would, in that case, have to pay for rent somewhere, which will make it hard for me to stay here as a student. The thing is, the restaurant stays open very late, so I have trouble making it to morning classes. If I could sign up for a few online classes, with flexible hours, my schedule might get easier. Is this possible?
To answer your immediate question, U.S. immigration regulations allow an F-1 student to take no more than one class or three credit hours per semester, trimester, or other academic term. (This comes from the Code of Federal Regulations at 8 C.F.R. Section 214.2(f)(6)(i)(G).) The idea is that, if you were given a visa to come all the way to the U.S. to study, you shouldn't be signing up for courses that you could have taken from anywhere in the world.
It sounds like you may have some bigger issues facing you than what type of courses to take, however. Your work at the restaurant – even if you aren't being directly paid – could be considered employment, for which you don't mention having received any authorization from U.S. Citizenship and Immigration Services. If you're doing work somewhere other than at a charitable, civic, or humanitarian organization, and it's the type of work that someone else would normally expect to be paid for, or that you're receiving some sort of benefit for (even if it's not money), the immigration authorities are likely to consider this "employment."
What's more, if your finances are so on the edge that you cannot afford U.S. housing, your right to an F-1 visa may be in danger.
We recommend you speak to an immigration attorney for a full analysis of your situation and discussion of how to proceed. Also, for more information on when F-1 students can (and cannot) work in the U.S., see the "U.S. Employment While on a Student Visa" page of Nolo's website.