This has nothing to do with what kind of music you make; rather, it's if you want (or had) piano/keyboard lessons. For that, 49 is cramped (but workable if you only play bass/leads), 61 is tolerable, 88 is better. However, if you haven't ever had lessons your hands haven't got muscle memory, so 49 is sufficient, but if you ever plan on learning, go for 61.
For electronic music it generally helps if the controller has pads and a good amount of sliders/knobs. People make stuff with their laptop and a 25-key controller, but that's kind of like painting the house through the mailbox.
Hey, I just wanted to know for producing electronic music such as trance and house how many keys should I have on a Midi Keyboard? Should it be 49 or 61?
Definitely 49 keys for trance and 25 keys for hardhouse. Also, you must only use 61 keys for funky house or disco otherwise you'll need a permit.
I'm jesting of course. To be honest, the more keys the better in any style of music. But if space is a factor then 49 keys work just as well with octave switchers. I produce EDM and use a 49 key controller in front of me as well as a digital piano (88 key) next to it. But I survived the longest time with just a 49 key. You make what you can with what you've got IMO.
You don't need so many keys when programming EDM when the different parts are limited in range. Akai MPK49 is a great keyboard for the purpose. I think that even 25 keys is enough if you want to be portable and take a laptop and keyboard with you.
But I also agree with "initself" that more keys are always good if you have space and budget for it.
Like most people here I came from a background of playing piano for most of my life prior to getting into making EM and I actually struggled quite a bit at first because nearly everything I was used to playing felt too complex to fit right once it entered synthesizer land. I ended up buying a 25 key controller to basicly force me to go one-handed and it worked very well for me.
Now I do almost everything on a 61 key because the synthesizer I ended up choosing as my keyboard controller happens to have 61 keys. I still own an 88 key controller but hardly ever use it.
...real EDM producers use the computer keyboard as their keyboard. Or even bypass that and just paint MIDI notes into the grid...
I find painting on the grid a lot quicker for certain things. Basslines and drums certainly. Why bother quantizing and regulating the velocities of your beats when you can do it by hand? To be completely honest, I only really use keys for when something clearly needs a touch of expressionism - a bit of soul. The rest is merely...... machine.
If you plan to do more "playing", and to be primarily studio based - I'd look at as many keys as your space will allow. If you plan to program, and expect to play out - look for something with 25 or 49 keys. Be mindful of space limitations and transportation/weight issues that could quickly become a big hassle if you plan on playing out. In either instance, I'd also look for something with a lot of real-time physical control options (knobs, sliders, etc).
A lot of folks would say to do the "slutty" thing and get both. I'd say go for one, learn it really well, and then reevaluate as your music and the business dictates. That's just my 2 pennies though.
I would go with 49 keys. I don't find myself using notes outside of that octave range at the same time anyway...with the exception of doing something with a classical piano/organ or splitting the keyboard for 2 synths. Sometimes I go a lot lower, but eventually you'll get more keyboards and you can just set one an octave lower
If you plan on doing anything outside your home/studio, a 49 is much easier to move around. If you're in a hotel or something and want to work on a piece, it sits nicely on most desks without needing to bust out a stand or put it on the bed. Additionally, midi controllers (at least mine) take abuse because you use them for your soft synth, might run them to your hardware, etc. Smaller ones are cheaper to replace.