Your right to an attorney comes from the Sixth Amendment of the United States Constitution. To invoke this right you do have to explicitly state that you are demanding legal counsel. It is not sufficient to ask law enforcement whether or not you should get a lawyer. It is not enough to say, maybe I should have a lawyer before answering. The Supreme Court has spoken clearly on this issue, you must unequivocally demand an attorney. Leave no doubts about it and inform law enforcement you demand an attorney and will not answer any questions without the presence of legal counsel. Also remember, that if you cannot afford an attorney, the government must provide one for you.