To offer perhaps a different perspective here, I wouldn't have hesitated to discuss something like this. Yours likes people who are able to solve their own problems. I'd perhaps pose the question though, that perhaps he also values those who know their own limitations and seek advice from others.
As the other answers stated, it's always good to talk to other students or post-docs. This may be for specific advice, or simply as a form of "rubber duck programming" - there is significant learning and new understanding by explaining something in fundamental terms to a metaphorical (or physical) rubber duck sat in your desk. If your colleagues are not experts in the field, even discussing the problem in broad terms may help you spot something you didn't spot before.
To give an example, I once was stuck in knots, trying to work out a complex concept in some code I was writing. I ended up discussing the problem in fundamental terms with my coworkers in the office. The process of explaining it to them (non experts in the topic) made me really think about the problem I was facing and its context. That led me to have the proverbial brainwave, and find a new angle of approach to the problem I hadn't considered.
In saying that, as I said earlier, I never hesitated to discuss things with my advisor. In fact, we would generally try to talk for at least half an hour per day. Of course that wasn't all seeking technical advice, rather dealing with ongoing business and updating each other on any progress or interesting ideas or discoveries. Obviously this depends on your advisor, but in my experience, advisors value independence, but also recognising your own limitations. I would rather a student I'm supervising came with a problem, than struggled and made no progress for weeks or months.
You asked how to avoid appearing "totally incompetent". What I advise is that you prepare a brief summary of what you've attempted. Be able to concisely explain the problem, and your initial analysis of how to solve it. Then be able to state the problem you're experiencing, and what you've tried to work around it. Did you refer to any other works or books (if so, mention this)? Putting a bit of effort into the question shows that you have put the work in, and understand the problem, but need some advice. Don't expect your advisor to immediately solve it, but perhaps they will give a few pointers or ideas. The first few words I mutter after being posed with a problem are often scribbled down quickly by students, who then go away to decipher them and try them out - often the initial thoughts from someone uninvolved with the problem help to solve it or offer a new insight or way of thinking.
I would add though that often it takes me a while to look through a complex problem. And I am often bad at replying to emails when my initial reaction is to delve straight into the problem! Replying to class-related questions is typically much easier (they are generally based on established theory and can be answered with reference to slides, notes or books. Failing that, the explanation is usually familiar). For ongoing, leading edge research, that's obviously not possible. Don't panic - in the cutting edge of research, even the most experienced professor doesn't know the answer immediately. Otherwise it wouldn't be the cutting edge!