I have below code where I get a run-time error as 'Unexpected Identifier'. My Resultset is not getting evaulated properly. Can someone please help?
Onclick Javascript code in Detail Page button
{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
var user = sforce.connection.getUserInfo();
var check=false;
var count = sforce.connection.query("SELECT COUNT() FROM Contract_vod__c WHERE Signature_Available_abv__c = false and Account_Name_abv__c='{!Account.Id}'");
alert('Count@Check'+count);
check=sforce.apex.execute("CheckAOCAccess","AOCAccess",{LoggedUser:"{!User.Id}"});
alert('check@'+check);
var vUrl = '/apex/ABV_AoCSignatureCapturOnline?actId={!Account.Id}';
if(check == 'true' && count>0)
{alert('check@1'+check);
alert('count@@1'+count);
window.open(vUrl);}
else if(check == 'false')
{alert('check@2'+check); alert('You are have not the privilege for Acknowledgement of Contents!');}
else {alert('count@2'+count); alert('You have no Acknowledgement of Contents pending to sign!');}