Pirelli has treated him like he is, so at least he should believe he is at first, because that's all he's known.
With Mrs. Lovett he comes to know (what seems like) actual kindness, so maybe he comes to think he's a real boy. And at that point, maybe he is or maybe he isn't. But I think the point at least when we first see him is that he's never been treated like an actual person and that has shaped how he thinks of himself. Then, of course, his new world turns out to be not what he thinks and what he thinks all at once.