To repeat the note on the coup data page: the Egyptian military's removal of President Morsi is unquestionably a coup attempt. There will inevitably be an ongoing debate over the justification of the effort and what the long term consequences may be, but the reality is that Morsi's ouster is a coup by just about any objective definition of the phenomenon. Simply put, coups concern the removal of a leader. They need not bring wider institutional change, they need not target democratic leaders, they need not be followed by the military maintaining power, and they need not lack popular support.
In defining coups we should not be interested in the character of the targeted leader (democratically elected, dictator, etc.), the military's post-coup actions (walk away, lead a transitional regime, praetorianism, etc), or the circumstances surrounding a coup (massive protests, peaceful, etc). How the international community should respond to such coups is a different story. But an objective definition focuses on the details of the event itself, and in this case we have seen a leader forcefully removed from office by the state's military.
Different scholars might be interested in different research questions, and those questions might cause definitions to slightly vary. What we see as a general trend is that an executive is removed (or an attempt is made to remove them) through unconstitutional means by other members of the state apparatus (government, military, security services, etc). Politicians might attempt to frame events as coups or non-coups to meet political ends, as we will undoubtedly see with the Egyptian case.
For those interested, Clayton Thyne and I explored a number of definitions of coups for our 2011 offering in the Journal of Peace Research. Below I provide a draft version of a table summarizing these definitions.
To the above definitions I would also point to...
Milan Svolik's (in The Politics of Authoritarian Rule, Cambridge University Press) characterization of coups as "forced removal of an authoritarian leader by any regime insider, not necessarily the military." (original emphasis).
*Note that this project was specifically interested in authoritarian politics.
Goemans, Gleditsch, and Chiozza's Archigos Data Set on Leaders
Specifically, I would point to leader exits coded as 5-8 on their EXITCODE variable (page 3 here), which includes:
"Leader removed by domestic military actors" (with or without foreign support)" and "Leader removed by other domestic government actors" (with or without foreign support.